//
//  YXYProgressHUD.h
//  GanJie
//
//  Created by 杨肖宇 on 2017/10/26.
//  Copyright © 2017年 yxy. All rights reserved.
//

#import <MBProgressHUD/MBProgressHUD.h>

@interface YXYProgressHUD : MBProgressHUD

/**
 延迟delay秒后隐藏并从父视图上remove
 @param view 展示hud的View
 @param text 展示Text
 @param delay delay时间
 @return hud实例
 */
+ (instancetype)showHUDAddedTo:(UIView *)view text:(NSString *)text delay:(NSUInteger)delay;

/**
 默认展示2s后隐藏并从superView上remove
 @param view 展示hud的View
 @param text 展示文案
 @param animated 隐藏后是否从父视图上remove
 @return hud实例
 */
+ (instancetype)showHUDAddedTo:(UIView *)view text:(NSString *)text animated:(BOOL)animated;

/**
 在keyWindow上展示HUD
 @param text text
 @param hide 是否2s后自动隐藏并从superView上remove
 */
+ (void)showText:(NSString *)text autoHiden:(BOOL)hide;

+ (instancetype)GetCurrentHUD;
    
@end
